{% include "header.html" %}
  <!-- Page Name -->
  <div id="page-name">
	  <div class="row">
	    <div class="twelve columns">
	      <h1>Notícias</h1>
	    </div>
	  </div>
  </div>
  
  
  <!-- Main Page Content and Sidebar -->

  <div class="row">
      <p>Sua busca retornou <strong>{{quant}} canditado</strong> <strong>para {{bus}} - {{are}}.</strong></p>
    <!-- Page Details -->
    <section class="eight columns">
        {% load comments %}
        {% for news in paginated_news.object_list %}
      <article class="post">
	      <h2><a href="{{ news.get_absolute_url }}">{{ news.title }}</a></h2>

        {% get_comment_count for news as comment_count %}
	      <span class="meta">{{ news.date }} /{{ comment_count }} Comentários</span>
	      <p>{{ news.subTitle }}</p>
	      <a href="{{ news.get_absolute_url }}" class="more">Leia mais <i class="foundicon-right-arrow"></i></a>
      </article>
        {% endfor %}

      <div class="pagination pagination-centered">
      	<ul>
              {% if paginated_news.number > 1 %}
                  <li><a href="{% url WebSite.views.news %}?page=1">«</a></li>
              {% else %}
                  <li class="disabled"><a href="#">«</a></li>
              {% endif %}
              {% if paginated_news.has_previous %}
                  <li><a href="{% url WebSite.views.news %}?page={{ previous_page }}">{{ previous_page }}</a></li>
              {% endif %}
              <li class="active"><a href="#">{{ paginated_news.number }}</a></li>
              {% if paginated_news.has_next %}
                  <li><a href="{% url WebSite.views.news %}?page={{ next_page }}">{{ next_page }}</a></li>
              {% endif %}
              {% if paginated_news.number < paginated_news.paginator.num_pages %}
                  <li><a href="{% url WebSite.views.news %}?page={{ paginated_news.paginator.num_pages }}">»</a></li>
              {% else %}
                  <li class="disabled" ><a href="#">»</a></li>
              {% endif %}
        </ul>
    </div>

    </section>

    <!-- End Contact Details -->


    <!-- Sidebar -->
    
    <aside class="four columns">

	    <div class="side-box">
	      <h5>Busca</h5>
	      <div class="row collapse">
	      	<form class="custom busca">
	          	<div class="eight mobile-three columns">
	            	<input type="text" placeholder="O que procura?">
	            </div>
	            <div class="four mobile-one columns">
	            	<a class="button expand postfix">Buscar</a>
	            </div>
	      	</form>
          </div>
	    </div>
	    
	    <div class="side-box">
	      <h5>Arquivos</h5>
	      <div class="row collapse">
	      	<form class="custom arquivo">
				<select style="display:none;" id="arquivos">
				  <option SELECTED>Outubro 2012</option>
				  <option>Setembro 2012</option>
				  <option>Agosto 2012</option>
				</select>
				<div class="custom dropdown">
				  <a href="#" class="current">Outubro 2012</a>
				  <a href="#" class="selector"></a>
				  <ul>
				    <li>Outubro 2012</li>
				    <li>Setembro 2012</li>
				    <li>Agosto 2012</li>
				  </ul>
				</div>
	      	</form>
          </div>
	    </div>
	    
	    <div class="side-box">
	      <h5>Últimos comentários</h5>
	      
	      <ul class="ult-coment">
              {% for news in news %}
              {% get_comment_list for news as comment%}
              {% for comments in comment|slice:"0:5"%}

		      <li>
			  	<i class="foundicon-quote"></i>
			    <p>{{ comments.name }}</p>
			    <span><a href="#">{{ comments.comment }}</a></span>
		      </li>
              {% endfor %}
              {% endfor %}
	      </ul>
	      
	    </div>

    </aside>

    <!-- End Sidebar -->
  </div>

  <!-- End Main Content and Sidebar -->
{% include "footer.html" %}